<?php

/* @var $this \yii\web\View */
/* @var $content string */

use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use frontend\assets\AppAsset;
use common\widgets\Alert;
use common\models\Setting\Setting;

//关键词
$keywords = '';
try
{
    $keywords = Setting::findOne(['code'=>'siteKeyword'])->value;
}
catch (ErrorException $e)
{

}
//描述
$description = '';
try
{
    $description = Setting::findOne(['code'=>'siteTitle'])->value;
}
catch (ErrorException $e)
{

}
//网站名称
$siteName = '';
try
{
    $siteName = Setting::findOne(['code'=>'siteName'])->value;
}
catch (ErrorException $e)
{

}
if(!$this->title)
{
    $this->title = $siteName;
}

//百度统计
$tongji = '';
try
{
    $tongji = Setting::findOne(['code'=>'tongji'])->value;
}
catch (ErrorException $e)
{

}
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
    <meta charset="<?= Yii::$app->charset ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="format-detection" content="telephone=no"  />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge，chrome=1">

    <?= Html::cssFile('@web/css/style.css')?>
    <?= Html::cssFile('@web/css/drawer.min.css') ?>

    <?= Html::jsFile('@web/js/jquery-1.9.1.min.js') ?>

    <?= Html::jsFile('@web/js/PCASClass.js') ?>
    <?= Html::jsFile('@web/js/iscroll.js') ?>

    <?= Html::jsFile('@web/js/hDate.js') ?>
    <script type="text/javascript" src="<?= yii::getAlias('@web');?>/js/jquery.drawer.min.js"></script>
    <script type="text/javascript" src="<?= yii::getAlias('@web');?>/js/jquery.event.drag-1.5.min.js"></script>
    <script type="text/javascript" src="<?= yii::getAlias('@web');?>/js/jquery.touchSlider.js"></script>
    <script type="text/javascript" src="<?= yii::getAlias('@web');?>/js/all.js"></script>   

    
    <?= Html::csrfMetaTags() ?>
    <title><?= Html::encode($this->title); ?></title>
    <?php $this->registerMetaTag(['name'=>'keywords','content'=>$keywords]);?>
    <?php $this->registerMetaTag(['name'=>'description','content'=>$description]);?>
    <?php $this->head() ?>
    <?= $tongji ?>
</head>
<body class="bo">
<?php $this->beginBody() ?>

<!--wapper-->
<div class="drawer drawer-right wapper">
    <?= $this->render('header.php'); ?>
    <?= $this->render('content.php',['content'=>$content]); ?>
</div>
<!--wapper end-->
<?php $this->endBody() ?>
</body>
        <?php if (isset($this->blocks['footer_scripts'])): ?>
        <?= $this->blocks['footer_scripts'] ?>
        <?php endif; ?>
</html>
<?php $this->endPage() ?>
